package com.flickx.po;

import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import java.util.List;

/**
 * @author flick on 2017/5/8.
 * @version 1.0
 */
@Entity
public class Orders extends AbstractEntity {
    private String orderNumber;
    @JsonIgnore
    @ManyToOne(cascade= CascadeType.ALL,fetch= FetchType.LAZY)
    private User user;
    @OneToMany(mappedBy="order",fetch=FetchType.LAZY)
    @JsonIgnore
    private List<OrderDetil> orderDetilList;

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderDetil> getOrderDetilList() {
        return orderDetilList;
    }

    public void setOrderDetilList(List<OrderDetil> orderDetilList) {
        this.orderDetilList = orderDetilList;
    }
}
